package com.seashop.feign;

import com.seashop.feign.fallback.UserFeignClientFallBack;
import com.seashop.response.ResponseBase;
import com.seashop.request.LoginRequestParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author moredln
 * @desc 用户模块feign调用
 * @date 2020-08-06 17:26
 */
@FeignClient(value = "user", fallback = UserFeignClientFallBack.class)
public interface UserFeignClient {

    @GetMapping("/getVerificationCode")
    ResponseBase getVerificationCode(@RequestParam("mobile") String mobile, @RequestParam("areaCode") String areaCode, @RequestParam("countryCode") String countryCode);

    @PostMapping("/loginOrRegister")
    ResponseBase loginOrRegister(@RequestBody LoginRequestParam param);

    @GetMapping("/queryMemberLevel")
    ResponseBase queryMemberLevel(@RequestParam("userId") Integer userId);

}
